package cn.iocoder.yudao.module.erp.dal.mysql.business.order.orderquotation;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.erp.controller.admin.business.order.orderquotation.vo.OrderQuotationPageReqVO;
import cn.iocoder.yudao.module.erp.dal.dataobject.business.order.orderquotation.OrderQuotationDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 报价方式 Mapper
 *
 * @author yy
 */
@Mapper
public interface OrderQuotationMapper extends BaseMapperX<OrderQuotationDO> {

    default PageResult<OrderQuotationDO> selectPage(OrderQuotationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderQuotationDO>()
                .likeIfPresent(OrderQuotationDO::getName, reqVO.getName())
                .betweenIfPresent(OrderQuotationDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OrderQuotationDO::getId));
    }

}